<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>气瓶追踪单</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        html,
        body,
        #app,
        iframe {
            width: 100%;
            height: 100%;
        }
    </style>
</head>

<body>
    <iframe id="iframe" src="" frameborder="0"></iframe>
</body>
<script>
    // TODO 先不删除 暂时使用下面的
    // const time = setInterval(() => {
    //     if (window.plus) {
    //         clearInterval(time);
    //         const data = JSON.parse(plus.storage.getItem('pdf'))
    //         console.log(plus.storage.getItem('pdf'), 'pdf信息');
    //         const iframe = document.getElementById('iframe');

    //         const fileUrl = 'pdfjs/web/viewer.html?file=' + data.url;
    //         iframe.setAttribute('src', fileUrl)
    //     }
    // }, 100)
    setTimeout(() => {
        if (window.plus) {
            // clearInterval(time);
            const data = JSON.parse(plus.storage.getItem('pdf'))
            console.log(plus.storage.getItem('pdf'), 'pdf信息');
            const iframe = document.getElementById('iframe');

            const fileUrl = 'pdfjs/web/viewer.html?file=' + data.url;
            iframe.setAttribute('src', fileUrl)
        }
    }, 500);
</script>

</html>